﻿var ViewPortCtl = function() {

};

Ext.extend(ViewPortCtl, Object, {

			bdCmp : function() {

				var items = this.getItems();

				// var panel = new Ext.Panel({
				// layout : 'border',
				// frame : true,
				// items : items
				// });

				var viewport = new Ext.Viewport({
							layout : 'border',
							items : items
						});

			},
			getItems : function() {

				var items = this.getCenterPanel();
				var northPanel = this.getNorthPanel();

				var southPanel = this.getSouthPanel();
				items.push(northPanel);
				items.push(southPanel);

				// var kfc = cf.getC('kfc');
				// var kfcCmp = kfc.getComponent();

				return items;

			},
			getSouthPanel : function() {

				var aac = cf.getC('aac');
				var aacCmp = aac.getComponent();

				var wsPanel = this.getWsPanel();
				
				var height = cf.getC('gcc').sh * 0.3;

				var panel = new Ext.Panel({
							region : 'south',
							layout : 'border',
							height : height,
							split : true,
							items : [wsPanel, aacCmp]
						});

				return panel;

			},
			getWsPanel : function() {
				var lbc = cf.getC('lbc');
				var lbcCmp = lbc.getComponent();

				var mmc = cf.getC('mmc');
				var mmcCmp = mmc.getComponent();

				var panel = new Ext.Panel({
							region : 'center',
							layout : 'fit',
							//height : 100,
							split : true,
							items : [mmcCmp]
						});

				return panel;

			},
			getNorthPanel : function() {

				var ttc = cf.getC('ttc');
				var ttcCmp = ttc.getComponent();

				var tgc = cf.getC('tgc');
				var tgcCmp = tgc.getComponent();
				
				var height = cf.getC('gcc').sh * 0.25;

				var panel = new Ext.Panel({
							title : 'AnyShow审核',
							region : 'north',
							layout : 'border',
							height : height,
							split : true,
							items : [ttcCmp, tgcCmp]
						});

				return panel;

			},
			getCenterPanel : function() {

				var kfc = cf.getC('kfc');
				var kfcCmp = kfc.getComponent();

				var pc = cf.getC('pc');
				var pcCmp = pc.getComponent();

				var avc = cf.getC('avc');
				var avcCmp = avc.getComponent();

				var items = [pcCmp, kfcCmp, avcCmp]

				return items;

			}

		});